//
//  welcomeAdtViewController.m
//  AutoHome
//
//  Created by Flying meat on 9/15/15.
//  Copyright (c) 2015 CaoFeng. All rights reserved.
//

#import "welcomeAdtViewController.h"
#import "TabBarViewController.h"

//跳转到这个视图控制器就说名点击了欢迎界面的图片

@interface welcomeAdtViewController ()
{
    
    //声明一个WebView;
    UIWebView *webView;
    
}
@end

@implementation welcomeAdtViewController

- (void)viewDidLoad {
    [super viewDidLoad];


    
    //走webView;
    [self setWebView];
    
}

- (IBAction)refresh:(id)sender {
    
    [webView removeFromSuperview];
    [self performSelector:@selector(setWebView) withObject:nil afterDelay:2];
    
    
}



- (IBAction)jumpto:(id)sender {
    
    
    TabBarViewController *tab=[self.storyboard instantiateViewControllerWithIdentifier:@"TabBarViewController"];
    tab.modalTransitionStyle=UIModalTransitionStyleCrossDissolve;
    [self presentViewController:tab animated:YES completion:nil];
}




-(void)setWebView
{
    
    webView=[[UIWebView alloc]initWithFrame:CGRectMake(0,64 , self.view.frame.size.width, 460)];
    NSURLRequest *request=[NSURLRequest requestWithURL:[NSURL URLWithString:self.openurl]];
    [self.view addSubview:webView];
    [webView loadRequest:request];
    
    
    
}
- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
